import type {RouteRecordRaw} from 'vue-router'

const momentsRoutes: RouteRecordRaw = {
    path: '/moments',
    component: () => import('./views/index.vue'),
    children: [
        {
            path: '',
            name: 'MomentsMain',
            component: () => import('./views/Main.vue'),
            meta: {
                title: 'Moments',
                requiresAuth: true
            }
        },
        {
            path: 'create',
            name: 'MomentsCreate',
            component: () => import('./views/Edit.vue'),
            meta: {
                title: '记录心情',
                requiresAuth: true
            }
        },
        {
            path: 'edit/:id',
            name: 'MomentsEdit',
            component: () => import('./views/Edit.vue'),
            meta: {
                title: '编辑动态',
                requiresAuth: true
            }
        },
        {
            path: 'stats',
            name: 'MomentsStats',
            component: () => import('./views/Stats.vue'),
            meta: {
                title: '心情统计',
                requiresAuth: true
            }
        }
    ]
}

export default momentsRoutes